var ngapp = angular.module('Habitica', []);

ngapp.directive('pageTab', function() {
  return {
      restrict: 'E',
      replace: 'true',
      scope: {
          pageId: '@'
      },
      transclude : true,
      template: '<li>'
             + '<a href="#" data-page-id="{{pageId}}" onclick="menuEvent()"><span ng-transclude></span><span style="float: right;font-size: 20px" class="icon-angle-right"></span></a>'
             + '</li>'
  };
});

ngapp.component('backToMenu', {
    template: '<ul class="nav nav-stacked nav-left">'
           +   '<li>'
           +    '<a href="#" onclick="$(\'.main-page\').addClass(\'active\')"><span class="icon-reply"></span> 返回</a>'
           +   '</li>'
           + '</ul>'
});